﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace App_1.Migrations
{
    /// <inheritdoc />
    public partial class _0819 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("26a4bb33-8d76-4a27-9c33-fde63cfb6ff2"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("702c5fdd-081b-44ad-85a9-a4f21a4eb8f9"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("7cc90968-5ace-4187-b1b2-83532e9f918c"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("a25bd499-32b7-4c7e-9cf8-73ada1878841"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("a8fd5ca0-73bb-4fe4-9bb8-25c2e30ced78"));

            migrationBuilder.DeleteData(
                table: "Player",
                keyColumn: "Id",
                keyValue: new Guid("7c2dd686-35d6-4533-be00-827320120e66"));

            migrationBuilder.DeleteData(
                table: "Player",
                keyColumn: "Id",
                keyValue: new Guid("bdc0cfcd-61fa-41fa-9545-3ba3119f17fc"));

            migrationBuilder.CreateTable(
                name: "AspNetRoles",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetRoles", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AspNetUsers",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
                    EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
                    PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
                    TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
                    LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
                    LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
                    AccessFailedCount = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetUsers", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AspNetRoleClaims",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
                    table.ForeignKey(
                        name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "AspNetRoles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "AspNetUserClaims",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
                    table.ForeignKey(
                        name: "FK_AspNetUserClaims_AspNetUsers_UserId",
                        column: x => x.UserId,
                        principalTable: "AspNetUsers",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "AspNetUserLogins",
                columns: table => new
                {
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
                    table.ForeignKey(
                        name: "FK_AspNetUserLogins_AspNetUsers_UserId",
                        column: x => x.UserId,
                        principalTable: "AspNetUsers",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "AspNetUserRoles",
                columns: table => new
                {
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
                    table.ForeignKey(
                        name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
                        column: x => x.RoleId,
                        principalTable: "AspNetRoles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_AspNetUserRoles_AspNetUsers_UserId",
                        column: x => x.UserId,
                        principalTable: "AspNetUsers",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "AspNetUserTokens",
                columns: table => new
                {
                    UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
                    table.ForeignKey(
                        name: "FK_AspNetUserTokens_AspNetUsers_UserId",
                        column: x => x.UserId,
                        principalTable: "AspNetUsers",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "7a418f0b-1b3f-4e55-84d4-9878c10f9e60", null, "Administrator", "ADMINISTRATOR" },
                    { "a9636211-9cb1-4479-928d-60726fdc7bc2", null, "Guest", "GUEST" }
                });

            migrationBuilder.InsertData(
                table: "Player",
                columns: new[] { "Id", "Account", "AccountType", "DateCreated" },
                values: new object[,]
                {
                    { new Guid("0bfae340-3124-4b8a-8164-c155835f241e"), "mw2021", "Free", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2277) },
                    { new Guid("cae84b06-2186-4a81-b163-e4fb99f0c393"), "dc2021", "Free", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2285) }
                });

            migrationBuilder.InsertData(
                table: "Characters",
                columns: new[] { "Id", "Classes", "DateCreated", "Level", "Nickname", "PlayerId" },
                values: new object[,]
                {
                    { new Guid("38a98732-1daf-47e9-979d-cc1e51ceda66"), "Warrior", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2836), 90, "Iron Man", new Guid("0bfae340-3124-4b8a-8164-c155835f241e") },
                    { new Guid("3924070e-544a-4c76-a644-741c5ba1aeb2"), "Mage", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2768), 99, "Code Man", new Guid("0bfae340-3124-4b8a-8164-c155835f241e") },
                    { new Guid("467e92ae-f42e-4a1b-885d-7487820c45b7"), "Death Knight", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2846), 90, "Batman", new Guid("cae84b06-2186-4a81-b163-e4fb99f0c393") },
                    { new Guid("72b19ca9-9e32-4d72-8379-c7e5ccaf7103"), "Paladin", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2847), 99, "Superman", new Guid("cae84b06-2186-4a81-b163-e4fb99f0c393") },
                    { new Guid("a97524c7-7d0e-4e08-bbcb-7e35b56de887"), "Druid", new DateTime(2024, 8, 19, 21, 6, 28, 176, DateTimeKind.Local).AddTicks(2837), 80, "Spider Man", new Guid("0bfae340-3124-4b8a-8164-c155835f241e") }
                });

            migrationBuilder.CreateIndex(
                name: "IX_AspNetRoleClaims_RoleId",
                table: "AspNetRoleClaims",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "RoleNameIndex",
                table: "AspNetRoles",
                column: "NormalizedName",
                unique: true,
                filter: "[NormalizedName] IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "IX_AspNetUserClaims_UserId",
                table: "AspNetUserClaims",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_AspNetUserLogins_UserId",
                table: "AspNetUserLogins",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_AspNetUserRoles_RoleId",
                table: "AspNetUserRoles",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "EmailIndex",
                table: "AspNetUsers",
                column: "NormalizedEmail");

            migrationBuilder.CreateIndex(
                name: "UserNameIndex",
                table: "AspNetUsers",
                column: "NormalizedUserName",
                unique: true,
                filter: "[NormalizedUserName] IS NOT NULL");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AspNetRoleClaims");

            migrationBuilder.DropTable(
                name: "AspNetUserClaims");

            migrationBuilder.DropTable(
                name: "AspNetUserLogins");

            migrationBuilder.DropTable(
                name: "AspNetUserRoles");

            migrationBuilder.DropTable(
                name: "AspNetUserTokens");

            migrationBuilder.DropTable(
                name: "AspNetRoles");

            migrationBuilder.DropTable(
                name: "AspNetUsers");

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("38a98732-1daf-47e9-979d-cc1e51ceda66"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("3924070e-544a-4c76-a644-741c5ba1aeb2"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("467e92ae-f42e-4a1b-885d-7487820c45b7"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("72b19ca9-9e32-4d72-8379-c7e5ccaf7103"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("a97524c7-7d0e-4e08-bbcb-7e35b56de887"));

            migrationBuilder.DeleteData(
                table: "Player",
                keyColumn: "Id",
                keyValue: new Guid("0bfae340-3124-4b8a-8164-c155835f241e"));

            migrationBuilder.DeleteData(
                table: "Player",
                keyColumn: "Id",
                keyValue: new Guid("cae84b06-2186-4a81-b163-e4fb99f0c393"));

            migrationBuilder.InsertData(
                table: "Player",
                columns: new[] { "Id", "Account", "AccountType", "DateCreated" },
                values: new object[,]
                {
                    { new Guid("7c2dd686-35d6-4533-be00-827320120e66"), "mw2021", "Free", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(67) },
                    { new Guid("bdc0cfcd-61fa-41fa-9545-3ba3119f17fc"), "dc2021", "Free", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(78) }
                });

            migrationBuilder.InsertData(
                table: "Characters",
                columns: new[] { "Id", "Classes", "DateCreated", "Level", "Nickname", "PlayerId" },
                values: new object[,]
                {
                    { new Guid("26a4bb33-8d76-4a27-9c33-fde63cfb6ff2"), "Warrior", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(881), 90, "Iron Man", new Guid("7c2dd686-35d6-4533-be00-827320120e66") },
                    { new Guid("702c5fdd-081b-44ad-85a9-a4f21a4eb8f9"), "Mage", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(784), 99, "Code Man", new Guid("7c2dd686-35d6-4533-be00-827320120e66") },
                    { new Guid("7cc90968-5ace-4187-b1b2-83532e9f918c"), "Druid", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(883), 80, "Spider Man", new Guid("7c2dd686-35d6-4533-be00-827320120e66") },
                    { new Guid("a25bd499-32b7-4c7e-9cf8-73ada1878841"), "Death Knight", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(885), 90, "Batman", new Guid("bdc0cfcd-61fa-41fa-9545-3ba3119f17fc") },
                    { new Guid("a8fd5ca0-73bb-4fe4-9bb8-25c2e30ced78"), "Paladin", new DateTime(2024, 8, 15, 16, 3, 39, 899, DateTimeKind.Local).AddTicks(887), 99, "Superman", new Guid("bdc0cfcd-61fa-41fa-9545-3ba3119f17fc") }
                });
        }
    }
}
